﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using University.Workshop.Business;

namespace University.Workshop.WebApp
{
    public partial class WebMasterCP1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
                FormsAuthentication.RedirectToLoginPage();
            else
            {
                if (!WebmasterManager.IsWebmaster(User.Identity.Name))
                    Response.Write("<script>if(window.history.length>1){history.back();} else {window.location.href = 'Default.aspx';}</script>");
            } 
        }
    }
}